# 引用镜像
FROM node:10-alpine

# Create app directory
WORKDIR /home/node/app

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY ./app/package*.json ./
RUN npm config set registry https://registry.npm.taobao.org \
    && npm install
# If you are building your code for production
# RUN npm install --only=production

# Bundle app source
ADD ./app .

# 以下配置在 docker-compose.yml 中, 如不需要使用 docker-compose 则放开下面注释
# EXPOSE 8081
# CMD ["npm", "start"]